package com.project.dao;

import com.project.entity.StudentInfo;
import com.project.myBeans.StudentInfoDetail;

import java.util.List;

public interface StudentInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(StudentInfo record);

    int insertSelective(StudentInfo record);

    StudentInfo selectByPrimaryKey(Integer id);

    StudentInfoDetail selectDetailByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(StudentInfo record);

    int updateByPrimaryKey(StudentInfo record);

    //根据userid删除学生信息 by:WheelChen
    int deleteByUserId(Integer userid);

    //根据userid查找学生信息 by:WheelChen
    StudentInfo selectByUserId(Integer id);

    //模糊查找 by:WheelChen
    List<StudentInfo> selectByCondition(StudentInfo studentInfo);

    /**
     * author: WheelChen
     * date: 2017/7/26
     * function: 根据学校实习指导老师的教师信息表id计算被指导的实习学生人数
     *
     * @param internAdvisor 学校实习指导老师的教师信息表id
     * @return 指导人数
     */
    Integer countByInternAdvisor(Integer internAdvisor);

    /**
     * author: WheelChen
     * date: 2017/7/26
     * function: 根据用户id更新学生表信息
     *
     * @param studentInfo
     * @return
     */
    int updateByUserIdSelective(StudentInfo studentInfo);

    /**
     * author: WheelChen
     * date: 2017/10/30
     * function: 根据学院id查找学生信息
     *
     * @param schoolId 学院id
     * @return 学生信息表List
     */
    List<StudentInfo> selectBatchBySchoolId(Integer schoolId);

     /**
      * author: WheelChen
      * date: 2017/9/17
      * function: 根据系id查找学生信息
      *
      * @param departmentId
      * @return
      */
    List<StudentInfo> selectBatchByDepartmentId(Integer departmentId);

    /**
     * author: WheelChen
     * date: 2017/9/17
     * function: 根据专业id查找学生信息
     *
     * @param majorId
     * @return
     */
    List<StudentInfo> selectBatchByMajorId(Integer majorId);

    /**
     * author: WheelChen
     * date: 2017/9/16
     * function: 根据班级id查找学生信息
     *
     * @param classId
     * @return
     */
    List<StudentInfo> selectBatchByClassId(Integer classId);

    /**
     * author: WheelChen
     * date: 2017/9/18
     * function: 根据系id批量删除
     *
     * @param departmentId
     * @return
     */
    int deleteBatchByDepartmentId(Integer departmentId);

    /**
     * author: WheelChen
     * date: 2017/9/18
     * function: 根据专业id批量删除
     *
     * @param majorId
     * @return
     */
    int deleteBatchByMajorId(Integer majorId);

    /**
     * author: WheelChen
     * date: 2017/9/17
     * function: 根据班级id批量删除
     *
     * @param classId
     * @return
     */
    int deleteBatchByClassId(Integer classId);


    /**
     * author: WheelChen
     * date: 2017/10/22
     * function: 根据id批量删除学生表信息
     *
     * @param idList
     * @return
     */
    int deleteBatchByIdList(List idList);

    /**
     *  author: WheelChen
     * date: 2017/11/2
     * function: 根据学生信息表条件筛选对应大学下的学生
     *
     * @param studentInfo 学生信息表
     * @return
     */
    List<StudentInfo> selectBatchByConditionWithSchoolList(StudentInfo studentInfo);

}